package com.bwie.controller;

import com.bwie.pojo.Customer;
import com.bwie.service.CustomerService;
import com.bwie.utils.R;
import com.bwie.vo.LoginInfoVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author : Yoo19
 * @description :
 * @createDate : 2025/7/10 17:24 24
 */
@RestController
@RequestMapping("/auth")
public class AuthController {
    @Autowired
    private CustomerService customerService;

    @ApiOperation("发送验证码")
    @PostMapping("/sendCode/{mobile}")
    public R sendCode(@PathVariable("mobile")String mobile){
        return customerService.sendCode(mobile);
    }


    @ApiOperation("登陆")
    @PostMapping("/login")
    public R login(@RequestBody LoginInfoVo loginInfoVo){
        return customerService.login(loginInfoVo);
    }
}
